//定义数组存储3部手机对象。
//手机的属性:品牌，价格，颜色。
//要求，计算出三部手机的平均价格
public class A26{
	private String brand;
	private int price;
	private String color;
	
	public A26(){}
	public A26(String brand,int price,String color){
		this.brand = brand;
		this.price = price;
		this.price = price;
	}
	public String getBrand(){
		return brand;
	}
	public void setBrand(String brand){
		this.brand = brand;
	}
	public int getPrice(){
		return price;
	}
	public void getPrice(int price){
		this.price = price;
	}
	public String color(){
		return color;
	}
	public void getColor(String color){
		this.color = color;
	}
	public static void main(String[] args){
		A26[] arr = new A26[3];
		A26 s1 = new A26("小米",1999,"白色");
		A26 s2 = new A26("华为",4999,"红色");
		A26 s3 = new A26("红米",3999,"蓝色");
		arr[0] = s1;
		arr[1] = s2;
		arr[2] = s3;
		int sum = 0;
		for(int i = 0;i < arr.length;i++){
			sum = sum + arr[i].getPrice();
		}
		double average = sum*1.0 / arr.length;
		System.out.println(average);
	}

}